package com.cgbl.service.adapter

import com.cgbl.service.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.robot.base.model.MemberAdapterBean
import com.robot.base.utils.pic.ImageLoaderUtils

class MemberFrameAdapter :
    BaseQuickAdapter<MemberAdapterBean, BaseViewHolder>(R.layout.app_item_member_frame) {

    override fun convert(holder: BaseViewHolder, item: MemberAdapterBean) {
        ImageLoaderUtils.displayCircle(context, holder.getView(R.id.iv_avatar), item.head)
        holder.setText(R.id.tv_name, item.nickName)
        holder.setText(R.id.tv_state, if (item.onlineStatus == "0") "在职" else "离职")
        holder.setText(R.id.tv_job, item.career)
        holder.setText(R.id.tv_money, "¥" + item.wages)
    }
}